package org.rk.core.common.exception;
import org.springframework.core.NestedRuntimeException;
import org.springframework.util.ObjectUtils;

public class PropertyErrorException extends NestedRuntimeException{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public PropertyErrorException(String msg) {
		super(msg);
	
	}
	public PropertyErrorException(String msg, Throwable cause) {
		super(msg, cause);
	}


	@Override
	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof PropertyErrorException)) {
			return false;
		}
		PropertyErrorException otherEx = (PropertyErrorException) other;
		return (getMessage().equals(otherEx.getMessage()) &&
				ObjectUtils.nullSafeEquals(getCause(), otherEx.getCause()));
	}

	@Override
	public int hashCode() {
		return getMessage().hashCode();
	}
}
